package lab01;

public class Test10 {
    public static void main(String[] args) {
        char[] ch1 = new char[10];//上三角形
        char[] ch2 = new char[10];//下三角形
        //对两个数组进行赋值
        int i = 0;
        for (i = 0;i < 10;i ++){
            ch1[i] = (char)(65 + i);
        }
        int j = 0;
        for (j = 0;j < 10;j ++){
            ch2[j] = (char)(75 + j);
        }
        //控制上三角形的输出
        for (int count1 = 0;count1 < 4;count1 ++){
            for (int space1 = 4 - count1;space1 > 1;space1 --){
                System.out.print("\t");
                }
            if (count1 == 0){
                for (int couter1 = 0;couter1 <1; couter1 ++){
                    System.out.print(ch1[couter1]);
                }
            }
            if (count1 == 1){
                for (int couter1 = 1;couter1 <3; couter1 ++){
                    System.out.print(ch1[couter1]);
                    System.out.print("\t");
                    System.out.print("\t");
                }
            }
            if (count1 == 2){
                for (int couter1 = 3;couter1 <6; couter1 ++){
                    System.out.print(ch1[couter1]);
                    System.out.print("\t");
                    System.out.print("\t");
                }
            }
            if (count1 == 3){
                for (int couter1 = 6;couter1 <10; couter1 ++){
                    System.out.print(ch1[couter1]);
                    System.out.print("\t");
                    System.out.print("\t");
                }
            }
            System.out.println();
            }
            //控制下三角形的输出。
        for (int count2 = 0;count2 < 4;count2 ++) {
            for (int space2 = 1; space2 < count2 + 1; space2 ++) {
                System.out.print("\t");
            }
            if (count2 == 0) {
                for (int couter2 = 0; couter2 < 4; couter2++) {
                    System.out.print(ch2[couter2]);
                    System.out.print("\t");
                    System.out.print("\t");
                }
            }
                if (count2 == 1) {
                    for (int couter2 = 4; couter2 < 7; couter2++) {
                        System.out.print(ch2[couter2]);
                        System.out.print("\t");
                        System.out.print("\t");
                    }
                }
                if (count2 == 2) {
                    for (int couter2 = 7; couter2 < 9; couter2++) {
                        System.out.print(ch2[couter2]);
                        System.out.print("\t");
                        System.out.print("\t");
                    }
                }
                if (count2 == 3) {
                    for (int couter2 = 9; couter2 < 10; couter2++) {
                        System.out.print(ch2[couter2]);
                        System.out.print("\t");
                        System.out.print("\t");
                    }
                }
                System.out.println();
            }
    }
}

